<template>
  <div class="home_wrapper">
    <button @click="aaa">Home111</button>
    <van-button @click="aseFn" type="primary" block>加密请求</van-button>
  </div>
</template>
<script>
import Demo from './../components/Demo.vue';
import Api from './../api/api'
import { isApp, isAndroid, buildParams } from '@@/common/plugins/common.js';
import { Encrypt, Decrypt, Authorization } from '@@/common/plugins/aes.js';
import CryptoJS from 'crypto-js/crypto-js'



export default {
  name: 'Home',
  mounted () {

  },
  methods: {
    aseFn () {
      let params = {
        user_id: '3287703'
      }
      console.log(1111)
      Api.aesTest(params)
    },
    aaa () {
      if (isAndroid()) {
        console.log(window.TokenJsInterface)
        window.location.href = 'https://hxsapp_header_action?id=0';
        window.TokenJsInterface.getData("11111");
      } else {
        // console.log(window.webkit.messageHandlers)
        console.log(window.webkit.messageHandlers.TokenJsInterface)
        window.webkit.messageHandlers.TokenJsInterface.postMessage("11111");
      }


    }
  }
}
</script>
<style lang="scss" scoped></style>
